package com.zh.note.demo.javaSE;

/**
 * @Author: zhanghuan
 * @date: 2023/10/12 16:12
 * @description: create it
 */
public class OuterTest {
    private void test(final int i) {
        new Service() {
            @Override
            public void method() {
                for (int j = 0; j < i; j++) {
                    System.out.println("匿名内部类");
                }
            }
        }.method();
    }
}

interface Service {
    void method();
}
